{#{% extends 'Base/main.content.lists.div.html.twig' %}#}
{#{% import 'Base/list_item.twig' as listItem %}#}
{% extends 'Back/Sano/list.creator.html.twig' %}
{% import 'Back/Sano/list.item.twig' as listItem %}
{#默认不能删除和新增#}
{#{% block addBtn %}{% endblock %}#}
{#{% block delBtn %}{% endblock %}#}
{% block tableHead %}
    <tr>
        <th align="" width="5%">选择</th>
        <th align="" width="">{{config.name.label}}</th>
        <th align="" width="">{{config.parent.label}}</th>
        <th align="" width="30%">{{config.pic.label}}</th>
        <th align="" width="7%">{{config.sort.label}}</th>
        <th align="" width="">{{config.enable.label}}</th>
        <th align="" width="">{{config.isHot.label}}</th>
{#        <th align="" width="">{{config.isTop.label}}</th>#}
        <th align="center" width="8%">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
{#    {{ dump(lists) }}#}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.data.id }}"/></span>
            </td>
            <td align='' width='' id='name_{{ Entity.data.id }}'>
                {{ listItem.tab(Entity.pre) }}
                {{ listItem.text('name',Entity.data.name,Entity.data.id) }}
            </td>
            <td align='' width='' id='parent_{{ Entity.data.id }}'>
                {{ listItem.text('parent',Entity.data.parent,Entity.data.id) }}
            </td>
            <td align='' width='' id='pic_{{ Entity.data.id }}'>
                {{ listItem.pic('pic',Entity.data.pic,Entity.data.id) }}
            </td>
            <td align='' width='' id='sort_{{ Entity.data.id }}'>
                {{ listItem.editVal('sort',Entity.data.sort,Entity.data.id) }}
            </td>
            <td align='' width='' id='enable_{{ Entity.data.id }}'>
                {{ listItem.switch('enable',Entity.data.enable,Entity.data.id) }}
            </td>
            <td align='' width='' id='isHot_{{ Entity.data.id }}'>
                {% if Entity.level == 1 %}
                {{ listItem.switch('isHot',Entity.data.isHot,Entity.data.id) }}
                {% endif %}
            </td>
{#            <td align='' width='' id='isTop_{{ Entity.data.id }}'>#}
{#                {{ listItem.switch('isTop',Entity.data.isTop,Entity.data.id) }}#}
{#            </td>#}
            <td align='' width=''>
                {{ listItem.manage('Category','',Entity.data.id) }}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}


